/**
 * @author: gao
 * @create-date: 2025/5/21 22:02
 */

public class Main {
    public static void main(String[] args) {
        int Total_Horse = 100;
        int Total_Load = 100;
        for (int x = 1; x <= Total_Horse; x++) {
            for (int y = 1; y <= Total_Horse - x; y++) {
                int z = Total_Horse - x - y;
                if (3 * x + 2 * y + z / 2 == Total_Load) {
                    if (z % 2 == 0) {
                        System.out.println("Large horses: " + x + ", Medium horses: " + y + ", Small horses: " + z);
                    }
                }
            }
        }
    }
}